package com.huawei.m2m.cig.decoder.hxushen.wxushen.generate.cloud;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.huawei.m2m.cig.decoder.protocol.NBMessage;
import com.huawei.m2m.cig.decoder.protocol.OutputBuffer;

public class downlinkvalue
  extends NBMessage
{
  private String value;
  
  public downlinkvalue()
  {
    setName("downlinkvalue");
    setMessageId(1);
    setType("cloudReq");
  }
  
  public String getValue()
  {
    return this.value;
  }
  
  public void setValue(String paramString)
  {
    this.value = paramString;
  }
  
  public void encode(OutputBuffer paramOutputBuffer)
  {
    paramOutputBuffer.putString(this.value, "UTF-8");
  }
  
  public void configJsonNode(ObjectNode paramObjectNode)
    throws Exception
  {
    JsonNode localJsonNode1 = paramObjectNode.get("paras");
    
    JsonNode localJsonNode2 = localJsonNode1.get("value");
    if (localJsonNode2 != null) {
      setValue(localJsonNode1.get("value").asText());
    }
  }
}
